{% extends "modal_base.html" %}

{% block modal_header %}<strong>Редактировать запись</strong>{% endblock %}

{% block modal_body %}
        <form id="post_edit" class="ajax" role="form" action="{{ edit_post_url }}" method="post">
        <div class="form-group">
	        <label for="title">Заголовок:</label><br/>
	        <input id="title" class="form-control" type="text" name="title" value="{{ post.title }}"><br/>
        </div>
		<div class="form-group">
	        <label for="tags">Ключеные слова</label></br>
	       	<input id="tags" class="form-control" type="text" name="tags" value="{{ tags }}"><br/>
        </div>
		<div class="form-group">
	        <label for="content">Содержание:</label><br/>
	       	<textarea id="content" class="form-control" form="post_edit" name="text">{{ post.text }}</textarea><br/>
		</div>
        </form>
{% endblock %}

{% block modal_footer %}
	<button class="btn btn-primary" type="submit" form="post_edit" >Сохранить</button>
{% endblock %}